
<?php // echo $this->Session->flash('auth');   ?>
<h1 class="h1-chanfro"><?php echo __('Laborat&oacute;rios cadastrados no sistema'); ?></h1>
<?= $this->Html->link(__('Adicionar'), array('controller' => 'Laboratorios', 'action' => 'add'), array('title' => __('Adicionar novo laboratório'), 'class' => 'btn btn-success margin-l-5 margin-b-5')) ?>

<table id="tabela" class="tablesorter table table-striped table-bordered table-hover">
    <thead>
        <tr>
            <th class="header"><?= __('Nome') ?></th>
            <th class="header"><?= __('Centro') ?></th>
            <th class="header"><?= __('Pr&eacute;dio') ?></th>
            <th class="header"><?= __('Sala') ?></th>
            <th class="header wid-max-700"><?= __('Endereço') ?></th>
            <th class="header"><?= __('A&ccedil;&atilde;o') ?></th>
        </tr>
    </thead>
    <tbody>
        <?php
        foreach ($laboratorios as $laboratorio):
            ?>
            <tr>
                <td>
                    <?php
                    echo $this->Form->postLink(
                            $laboratorio['Laboratorio']['nome'], array('controller' => 'Laboratorios',
                        'action' => 'view', $laboratorio['Laboratorio']['id']), array(
                        'title' => __('Visualizar Laboratório')));
                    ?>
                </td>
                <td>
                    <?php echo $laboratorio['Laboratorio']['centro'] ?>
                </td>
                <td>
                    <?php echo $laboratorio['Laboratorio']['predio'] ?>
                </td>
                <td>
                    <?php echo $laboratorio['Laboratorio']['sala'] ?>
                </td>
                <td class="wid-max-700">
                    <?php echo $laboratorio['Laboratorio']['endereco'] ?>
                </td>
                <td>
                    <?php
                    echo $this->Html->Link(
                            __('Editar'), array('controller' => 'Laboratorios',
                        'action' => 'edit', $laboratorio['Laboratorio']['id']), array(
                        'title' => __('Editar Laboratório'),
                        'class' => 'btn btn-warning btn-primary btn-xs'));
                    ?>
                    <?php
                    echo $this->Form->postLink(
                            __('Excluir'), array('controller' => 'Laboratorios',
                        'action' => 'delete', $laboratorio['Laboratorio']['id']), array('confirm' => __('Você tem certeza que deseja excluir este laboratório?'),
                        'title' => __('Excluir Laboratório'),
                        'class' => 'btn btn-danger btn-primary btn-xs'));
                    ?>
                </td>
            </tr>
            <?php
        endforeach;
        ?>
    </tbody>
</table>    
